﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Castle.ActiveRecord;
using NHibernate.Criterion;
using LIB;
using System.Collections;

public partial class admin_info : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                fckFooter.Value = Application_Info.Find(10).appValue;
                fckLienHe.Value = Application_Info.Find(9).appValue;
                fckGioiThieu.Value = Application_Info.Find(8).appValue;
                txtEmail.Text = Application_Info.Find(4).appValue;
            }
        }
        catch (Exception ex) { }
        
    }
    protected void btnLuuTTLH_Click(object sender, EventArgs e)
    {
        try
        {
            Application_Info appInfo = Application_Info.Find(9);
            appInfo.appValue = fckLienHe.Value;
            appInfo.SaveAndFlush();
        }
        catch(Exception ex){}
    }
    protected void btnLuuFooter_Click(object sender, EventArgs e)
    {
        try
        {
            Application_Info appInfo = Application_Info.Find(10);
            appInfo.appValue = fckFooter.Value;
            appInfo.SaveAndFlush();
        }
        catch (Exception ex) { }

    }
    protected void btnLuuGioiThieu_Click(object sender, EventArgs e)
    {
        try
        {
            Application_Info appInfo = Application_Info.Find(8);
            appInfo.appValue = fckGioiThieu.Value;
            appInfo.SaveAndFlush();
        }
        catch (Exception ex) { }

    }
    protected void btnLuuEmail_Click(object sender, EventArgs e)
    {
        try
        {
            Application_Info appInfo = Application_Info.Find(4);
            appInfo.appValue = txtEmail.Text;
            appInfo.SaveAndFlush();
        }
        catch (Exception ex) { }
    }
}